package com.ggb.reactive.domain.entity

import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.v3.oas.annotations.media.Schema
import lombok.AllArgsConstructor
import lombok.Builder
import lombok.Data
import lombok.NoArgsConstructor
import org.springframework.data.annotation.Id
import org.springframework.data.relational.core.mapping.Table
import java.time.Instant

@Table("category")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title="分类实体 Category")

data class Category(
    @Id
    var id:Long? = null,
    //类型: 1菜品分类 2套餐分类
    @Schema(description = "类型: 1菜品分类 2套餐分类")
    var type:Int?=null,
    //分类名称
    @Schema(description = "分类名称")
    var name:String?=null,
    //顺序
    @Schema(description = "顺序")
    var sort:Int?=null,
    //分类状态 0标识禁用 1表示启用
    @Schema(description = "分类状态 0标识禁用 1表示启用")
    var status:Int?=null,
    //创建时间
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-6")
    var createTime:Instant?=null,
    //更新时间
    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-6")
    var updateTime:Instant?=null,
    //创建人
    @Schema(description = "创建人")
    var createUser:Long?=null,
    //修改人
    @Schema(description = "修改人")
    var updateUser:Long?=null
)
